﻿namespace Common
{
    /// <summary>
    /// Name - RecipeIngredient.cs
    /// Description - Class representation of an ingredient in a recipe
    /// Programmer - CSC440 Team One
    /// Modifications -
    ///     1.0 - Initial coding
    /// Known Faults -
    ///     1.0 - None known
    /// </summary>
    public class RecipeIngredient
    {
        /// <summary>
        /// The amount of the ingredient
        /// </summary>
        public int quantity { get; set; }

        /// <summary>
        /// The measurement of the quantity
        /// </summary>
        public string measurement { get; set; }

        /// <summary>
        /// The ingredient
        /// </summary>
        public Ingredient ingredient { get; set; }

        public RecipeIngredient()
        {

        }

        /// <summary>
        /// Courtesy constructor
        /// </summary>
        /// <param name="q">Quantity</param>
        /// <param name="m">Measurement</param>
        /// <param name="i">Ingredient</param>
        public RecipeIngredient(int q, string m, Ingredient i)
        {
            quantity = q;
            measurement = m;
            ingredient = i;
        }

        /// <summary>
        /// String representation of the RecipeIngredient object
        /// </summary>
        /// <returns>Quantity Measurement Ingredient</returns>
        public override string ToString()
        {
            return (quantity + " " + measurement + " " + ingredient);
        }

        /// <summary>
        /// DELETE THIS METHOD AND JUST USE quantity.ToString()
        /// </summary>
        /// <returns></returns>
        public string quantityToString()
        {
            string s = "" + quantity.ToString();
            return s;
        }
    }
}
